/**
 * Created by Administrator on 2017/6/6 0006.
 */
import {Pipe, PipeTransform} from '@angular/core';

@Pipe({name: 'sexPipe'})
export class SexPipe implements PipeTransform {
  transform(value: string): string {
    let sex;
    switch (value) {
      case '1':
        sex = '男';
        break;
      case '2':
        sex = '女';
        break;
      case '0':
        sex = '保密';
        break;
    }
    return sex;
  }
}
